<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>九九乘法表</title>
    <style type="text/css">
        table {
            width: 800px;
            height: 300px;
            border-collapse: collapse;
        }
        table th {
            border: 1px solid #069;
        }
        body {
            text-align: center;
        }
        h1 {
            font-family: "微软雅黑", Verdana, sans-serif, "宋体";
            color: #666;
            font-weight: bold;
            margin-bottom: 30px;
        }
        </style>

</head>
<body>
        <script type="text/javascript">
            document.write("<table>");
            var str = "js九九乘法表";
            document.write("<h1>" + str + "</h1>");
            for ( var x = 1; x <= 9; x++) {
                document.write("<tr>");
                for ( var y = 1; y <= x; y++) {
                    document.write("<th>" + x + "*" + y + "=" + (x * y) + "</th>");
                }
                document.write("</tr>");
            }
            document.write("</table>");
        </script>

    
</body>
</html>